<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr = [11,22,33,44,55,66];
        // 1. for i
        // for (let i = 0; i < arr.length; i++) {
        //     console.log(i+","+arr[i]);
        // }

        // 2. for of
        // let index = 0;
        // for(let item of arr){
        //     console.log(index+","+item);
        //     index++;
        // }

        // 3. for in
        // for (let index in arr) {
        //     console.log(index+","+arr[index]);
        // }

        // 4. forEach
        arr.forEach((item,index) => {
            console.log(index+","+item);
        })
    </script>
</body>
</html>